package com.xjh.controller;

import com.xjh.bo.TestTable;
import com.xjh.bo.TestValidBO;
import com.xjh.jparepository.TestSqlQuery;
import com.xjh.utils.resultutils.ResponseObj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;

@RestController
@RequestMapping("sqlQuery")
public class TestSqlQueryController {
    @Autowired
    private TestSqlQuery testSqlQuery;

    @GetMapping("/getQuery")
    public ResponseObj queryAll() {
        List<TestTable> test = testSqlQuery.test();
        ResponseObj responseObj = new ResponseObj();
        return responseObj.ok(test);
    }
}
